package com.kk.init;

import com.kk.service.KkService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.stereotype.Component;

/**
 * 6.BeanFactoryAware
 *
 * <p>
 * .
 *
 * @author little_lunatic
 * @date 2023-08-04
 */
@Slf4j
@Component
public class TestBeanFactoryAware implements BeanFactoryAware {
    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        log.info("6.BeanFactoryAware " + beanFactory.getBean(KkService.class).getClass());
    }
}
